export function deepClone(obj) {
  const cloneObj = {}
  if (obj === null) return obj
  if (obj instanceof Date) return new Date(obj)
  if (obj instanceof RegExp) return new RegExp(obj)
  if (typeof obj !== 'object') return obj
  for (var i in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, i)) {
      cloneObj[i] = deepClone(obj[i])
    }
  }
  return cloneObj
}
